-- GENERATED SPELL FOR [Skeletal Craftsman] --


function spell0_32164(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(42724,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32164', 677, 1)
end

function spell1_32164(pUnit, Event) --@Pierce Armor,n/a--
pUnit:FullCastSpellOnTarget(46202,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32164', 10000, 1)
end

function Sorts_32164(pUnit, Event)
local choix_sorts_32164 = math.random(0, 1)
if choix_sorts_32164 == 0 then
pUnit:RegisterEvent('spell0_32164', 1, 1)
end
if choix_sorts_32164 == 1 then
pUnit:RegisterEvent('spell1_32164', 1, 1)
end
end

function mob32164_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32164', math.random(1500, 3000), 1)
end

function mob32164_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32164_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32164_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32164, 1, 'mob32164_Action')
RegisterUnitEvent(32164, 2, 'mob32164_Leave')
RegisterUnitEvent(32164, 3, 'mob32164_Kill')
RegisterUnitEvent(32164, 4, 'mob32164_Die')
